package YahooFinance;

import java.util.Date;

public class StockID {

	private String stockSymbol;
	private Date timestamp;

	public StockID(String pStockSymbol, Date pTimestamp) {
		this.stockSymbol = pStockSymbol;
		this.timestamp = pTimestamp;
	}

	public String getStockSymbol() {
		return stockSymbol;
	}

	public void setStockSymbol(String stockSymbol) {
		if (stockSymbol == null) {
			stockSymbol = "";
		}
		this.stockSymbol = stockSymbol;
	}

	public Date getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Date timestamp) {
		if (timestamp == null) {
			timestamp = new Date();
		}
		this.timestamp = timestamp;
	}

	public String toString() {
		return stockSymbol + "; " + timestamp.toLocaleString();
	}

}
